3D Graphics Programming with QuickDraw 3D 1.5.4
Previous | QD3D Book | Overview | Chapter Contents | Next |
TOCEntry (
Uns32 refID
FilePointer objLocation
ObjectType objType
)
Type 1 TOC entries allow a parser to determine the type of a referenced object by inspecting tables of contents; type 0 TOC entries do not. Because QD3D 1.5 contains a new call ( Q3File_GetExternalReferences ) that makes use of this feature, in QD3D 1.5 the table of contents in both normal and database metafiles are written as type 1. In QD3D 1.0, the TOC entries in a normal metafile were written as type 0; the TOC entries in a database metafile were written as type 1.
FilePointer nextTOC
Uns32 refSeed
Int32 typeSeed
Uns32 tocEntryType
Uns32 tocEntrySize
Uns32 nEntries
TOCEntry tocEntries[nEntries]
A table of contents is a structure that provides a record of associations between reference IDs and file pointers. These associations are specified by the TOC entries of the table of contents. A metafile reader must use its tables of contents to discover linkages between reference objects and file pointers, as there is no other record of those associations. See "File Pointers" and "Reference Objects" for complete details regarding these objects.
A metafile that contains a reference to another object (by means of a reference object) must include at least one table of contents.
If a metafile contains more than one table of contents, then each table of contents should continue the record provided by the immediately previous table of contents (if such exists) without duplication. A table of contents may contain information about objects occurring before or after it or both, but should not contain information about any object that either precedes an object mentioned in a previous table of contents or follows an object mentioned in a subsequent table of contents.
3DMetafile ( 1 5 Database
tableofcontents0> )
box2:
Container (
Box (
0 0 1 # orientation
1 0 0 # majorAxis
0 0 0 # minorAxis
0 1 0 # origin
)
attributeset3:
Container (
AttributeSet ( )
DiffuseColor ( 0.9 0.9 0.2 )
)
)
translate4:
Translate ( 3 0 0 )
Reference ( 1 )
translate5:
Translate ( 0 3 0 )
Reference ( 1 )
translate6:
Translate ( -3 1 0 )
Reference ( 1 )
tableofcontents0:
TableOfContents (
tableofcontents1> # next TOC
6 # reference seed
-1 # typeSeed
1 # tocEntryType
16 # tocEntrySize
5 # nEntries
1 box2>
Box
2 attributeset3>
AttributeSet
3 translate4>
Translate
4 translate5>
Translate
5 translate6>
Translate
)
Previous | QD3D Book | Overview | Chapter Contents | Next |